<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ page isELIgnored="false" %>

<%
    String path = request.getContextPath();
%>

<jsp:include page="/admin/inc/incHead.jsp" flush="false"/>
<script>
    function adminCheck() {/*管理员信息校验*/
        if (document.formUpdate.adminPw.value.length > 0 && document.formUpdate.adminPw.value.length < 6) {
            alert("密码至少6位");
            document.formUpdate.adminPw.focus();
            return;
        }
        document.formUpdate.submit();
    }
</script>
<form action="<%=path %>/admin/adminEdit.action" name="formUpdate" method="post">
    <input type="hidden" name="adminId" value="<s:property value="#request.admin.adminId"/> ">
    <table class="table table-bordered" align="center">
        <tr>
            <td colspan="3" class='title'><span>员工修改</span></td>
        </tr>
        <tr align='center'>
            <td width="25%" bgcolor="#FFFFFF" align="right">
                用户名：
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <s:property value="#request.admin.adminName"/>
            </td>
        </tr>
        <tr align='center'>
            <td width="25%" bgcolor="#FFFFFF" align="right">
                密码：
            </td>
            <td width="75%" bgcolor="#FFFFFF" align="left">
                <input type="password" name="adminPw" id="userPw" value=""/>
            </td>
        </tr>
        <tr align='center'>
            <td width="25%" align="right">
                等级：
            </td>
            <td width="75%" align="left">
                <select name="adminLevel">
                    <option value="5" selected="selected">5仅可登录</option>
                    <option value="6">6可查询信息</option>
                    <option value="7">7可查询修改信息</option>
                    <option value="8">8可查询修改删除信息</option>
                    <option value="9">9可查询修改删除信息,添加其他员工</option>
                </select>
            </td>
        </tr>
        <tr align='center'>
            <td width="25%" align="right">
                &nbsp;
            </td>
            <td width="75%" align="left">
                <input type="button" onclick="adminCheck()" value="提交" class="btn btn-info"/>&nbsp;
            </td>
        </tr>
    </table>
</form>
<jsp:include page="/admin/inc/incFoot.jsp" flush="false"/>
